<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="content">请假申请</block>
		</cu-custom>
		<a-layout :status="info.$status">
			<template #header>
				<br/>
				<br/>
				<br/>
			</template>
			<a-scroll :request="get" ref="aScroll" :parm="parm" :loadStyle="{background:'transparent'}">
				<template #item="{row,index}">
					<a-cell :row="1" class="show-y-list" :columns="columns" :value="row"></a-cell>
				</template>
			</a-scroll>
		</a-layout>
	</view>
</template>

<script>
	import comm from "./common.js";
	import {
		format
	} from '@/a/utils/api.js';
	export default {
		mixins: [comm],
		onLoad(e) {
			this.parm = e;
		},
		data() {
			return {
				parm: {},
				info: {}
			}
		},
		methods: {
			get(parm = {}) {
				return this.$http.get('/api/v1/stuLeaveRecord/selectStuLeaveRecord', {
					...parm
				}).then(res => {
					this.info = {
						...res.stuInfo,
						...res,
						$status: {
							color: "red",
							title: res.stateDesc
						},
						startTime: format(res.startTime),
						endTime: format(res.startTime)
					};
					return {
						total: 0,
						data: [this.info]
					}
				});
			},
		}
	}
</script>

<style scoped>
	.show-y-list {
		box-sizing: border-box;
		background-color: #fff;
		margin: 3vmin auto;
		width: 92%;
		padding: 20rpx;
		border-radius: 6px;
		box-shadow: 0 0 26rpx 0 rgba(0, 0, 0, 0.3);
		position: relative;
		z-index: 2;
	}
</style>
